1. Field of the Invention
The present invention relates to an electronic document generation apparatus which generates an electronic document and its relevant technique.
2. Description of the Background Art
As to an image forming apparatus such as an MFP (Multi-Functional Peripheral), there have been techniques for generating an electronic document by scanning an original.
Among such techniques, there is a technique for generating an electronic document with text data (described below) (see Japanese Patent Application Laid Open Gazette No. 2012-73749: Patent Document 1), as well as a technique for generating an electronic document by capturing a scan image of the original without any change. Specifically, by performing an optical character recognition processing (hereinafter, referred to also as an OCR (Optical Character Recognition) processing) on a scan image of an original (especially, an image indicating characters), text data of the characters in the scan image is automatically recognized and the text data is superimposed on the scan image in a non-display state and embedded therein. Thus, generated is an electronic document (electronic document with text data) of predetermined format, which is termed a PDF (Portable Document Format) file with transparent text (or searchable PDF file) or the like.
Further, there has also been a technique for providing a versatile OCR processing service using a cloud server.
Actually, it is thought that the following operation can be performed by using the above techniques. For example, a scan image is transmitted from an electronic document generation apparatus to a cloud server, and an OCR processing is performed on the entire scan image by the cloud server. Then, the processing result (text data) is transmitted back to the electronic document generation apparatus from the cloud server, and the electronic document generation apparatus embeds the text data received from the cloud server into the original scan image, to thereby generate an electronic document with text data (searchable PDF file (PDF file with transparent text) or the like). Further, since another apparatus other than the electronic document generation apparatus can perform the OCR processing by using the versatile OCR processing service, it is possible to reduce the processing load of the electronic document generation apparatus.
In some of the versatile OCR processing services, a character area in a scan image is separated into predetermined unit areas (each of which can include an area larger than a line area for one line) (for example, paragraph areas) and an OCR processing is performed on each of the separated areas, to thereby generate text data as an OCR processing result, in which a delimiter code (line feed code or the like) is added at the end of a character string in each of the predetermined unit areas. When the electronic document generation apparatus receives the text data from the cloud server, the apparatus separates the character string in the text data into a plurality of ones on the basis of the delimiter codes in the text data and arranges each of the character strings in the corresponding predetermined unit area (paragraph area or the like) in the scan image, to thereby generate an electronic document.
In such versatile OCR processing services, however, an area including a plurality of lines of character strings is usually recognized as one paragraph area or the like, and text data is generated, in which a delimiter code is added only at the end of the whole character string for a plurality of lines. In other words, outputted is the text data in which no delimiter code is added at the end of a character recognition result of each line (other than the last line of the paragraph) of a plurality of lines forming the paragraph and character recognition results (OCR processing results) for a plurality of lines of character strings are continuous with one another. For this reason, the electronic document generation apparatus cannot grasp the correspondence between a character image for each line in the scan image and the character recognition result for each line, and consequently, the character recognition result for each line may not be arranged in a proper position (the position of the character image for each line corresponding to the character recognition result for each line) in the scan image. If the text data is outputted, in which the character recognition result for the first line and that for the second line are continuous with each other, for example, the character recognition result for the second line is arranged around the line end of the character image for the first line in the scan image, being continuous with the character recognition result for the first line (not line-fed), but not arranged at the proper position (the position of the character image for the second line in the scan image).